import { IParam } from "@/interface";

/**
 * @description 获取表单
 * @param runtimeParam 
 * @returns 
 */
export function getMenu(runtimeParam: any) {
  return runtimeParam?.menu?.value?.menu;
}

/**
 * @description 视图挂载
 * @param modelParam 
 * @param runtimeParam 
 */
export function viewMounted(modelParam: IParam, runtimeParam: IParam) {
  const menu = getMenu(runtimeParam);
  if (menu) {
    runtimeParam.viewState?.next({ tag: modelParam.menuName, action: 'load', data: {} })
  }
}